__author__ = 'wenke1'

scoreList = [('xiaohong',500),('ming',600),('ling',550),('huang',550)]

def sortedbyname(T):
    return T[0]

def getscore(T):
    return T[1]

newList = sorted(scoreList)
print newList

sortedbyscore = sorted(scoreList,key=getscore)
print sortedbyscore